
<table class="table table-condensed instance-switch">
  <tr>
    <td>
      <div id="repo-switch" class="btn-group btn-group-justified" role="group">
        <div class="btn-group" style="width: 90%" role="group">
          <div class="dropdown">
            <!-- TODO: add disabled when only 1 version is known? -->
            <button class="btn btn-xs btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" title="Select Instance">
              <span class="pull-left" style="width: 100%; text-align: left">
                <span class="pull-right"><span class="caret"></span></span> 
              <span class="glyphicon glyphicon-{% if page.default_instance_id == instance.id %}star{% else %}none{% endif %}"></span>
                  {{ instance.id }}
              </span>
            </button>
            <ul class="dropdown-menu" role="menu">
              {% for instance in page.instances %}
                <li role="presentation">
                  <a id="{{instance[0]}}" role="menuitem" tabindex="-1" href="{{site.baseurl}}/{{page.instance_base_url}}/{{instance[0]}}" data="{{instance[0]}}">
                    <span class="glyphicon glyphicon-{% if page.default_instance_id == instance[0] %}star{% else %}none{% endif %}"></span>
                    {{instance[1].id}}
                  </a>
                </li>
              {% endfor %}
            </ul>
          </div>
        </div>
      </div>
    </td>
  </tr>
</table>
